package main

import (
	"context"
	"github.com/apache/dubbo-go/config"
)

var userProvider = new(UserProvider)

func init() {
	config.SetConsumerService(userProvider)
}

type UserProvider struct {
	AddOne  func(ctx context.Context, user *User) (*User, error)
	RmOne   func(ctx context.Context, user *User) error
	FindOne func(ctx context.Context, name string) (*User, error)
}

func (u *UserProvider) Reference() string {
	return "UserProvider"
}
